home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
indus
/
rental
/
report.prg
< prev
next >
Wrap
Text File
|
1986-08-09
|
19KB
|
699 lines
** Last revision: May 26, 1986 at 15:30
* report.prg
STOR .t. TO more
DO WHIL more
STOR 'Y' TO printer
STOR 'N' TO disk
STOR ' ' TO filename
STOR '?' TO command
CLEA
IF clipper
@ 0,0, 22, 79 BOX frame
@ 4,1 SAY line1
@ 19,1 SAY line1
ELSE
@ 0,0 TO 4,79
@ 0,0 TO 19,79
@ 0,0 TO 22,79 DOUBLE
ENDI
@ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
@ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
@ 2,04 SAY dconame + " - BUILDING REPORT MENU"
@ 2,65 SAY DTOC(DATE())
@ 7,29 SAY "A. Rent bills"
@ 8,29 SAY "B. Tenant roster"
@ 9,29 SAY "C. Delinquency report"
@ 10,29 SAY "D. Tenant mailing labels"
@ 11,29 SAY "E. Vacancy list"
@ 12,29 SAY "F. Lease expiration and flag report"
@ 13,29 SAY "G. Return to Main Menu"
@ 15,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
@ 15,58 GET command PICTURE '!'
READ
DO WHIL AT(COMMAND, 'ABCDEFG?Q') = 0
STOR '?' TO command
@ 15,58 GET command PICTURE '!'
READ
ENDD
CLEA GETS
IF command >='B' .AND. command < 'G'
@ 17,01 SAY " Send Report to the Printer (Y/N)"
@ 17,55 GET printer PICTURE '!'
READ
@ 18,01 SAY " Send Report to a Disk File (Y/N)"
@ 18,55 GET disk PICTURE '!'
READ
IF disk ='Y'
@ 17,01 SAY SPACE(75)
@ 18,01 SAY SPACE(75)
@ 17,01 SAY " Enter Disk File Name"
@ 17,34 GET filename PICTURE '!!!!!!!!'
@ 17,44 SAY "(.TXT will be added )"
READ
@ 18,01 SAY ' Select drive to put Files on'
@ 18,55 GET dr PICTURE '!'
READ
DO WHIL AT(dr,'ABCD') = 0
@ 18,55 GET dr PICTURE '!'
READ
ENDD while @
ENDI disk = Y
STOR LEN(dconame)/2 TO L
STOR 40-L TO L
STOR ' ' TO bl
STOR SUBSTR(bl,1,L) + dconame TO coname
IF printer = 'Y'
@ 17,01 SAY SPACE(75)
@ 18,01 SAY SPACE(75)
@ 17,01 SAY ' MAKE PRINTER READY AND HIT ANY KEY'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
SET print ON
ENDI printer = Y
IF disk = 'Y' .AND. filename <> ' '
* make a proper REPORT file name that is of type TXT
STOR AT('.',filename) TO length
IF length = 0 .OR. length > 8
STOR 9 TO length
ENDI length
STOR SUBSTR(filename,1,length-1) TO filename
STOR '&dr.:'+filename+'.TXT' TO filename
SET ALTERNATE TO &filename
SET ALTERNATE ON
ENDI disk = Y and filename <> ''
ENDI command
CLEA
DO CASE
CASE command = 'A'
SET PRINT OFF
* rent bills
SELE A
USE &dr.:build
SET INDEX TO &dr.:code
CLEA
TEXT
This module prepares the rent bills. If the
rents for the month have not been posted and
the new rents not accrued please take care of
that before you run this program.
The form set up is for UARCO C599 and envelope
EN81. Form length is 7 inches.
ENDT
STOR 'Y' TO comman
@ 10,20 SAY 'ARE YOU READY TO PROCEED ? '
@ 10,50 GET comman PICTURE '!'
READ
IF COMMAN = 'Y'
SET confirm on
STOR ' ' TO build
@ 12,10 SAY "What building shall we prepare bills for ('99' for all) "
@ 12,70 GET build PICTURE '99'
READ
IF build <> '99'
SEEK build
DO WHIL (EOF() .OR. BOF())
@ 12,70 GET build PICTURE '99'
READ
SEEK build
ENDD WHILE #
ELSE
GO TOP
ENDI build <> '99'
STOR ' ' TO month
@ 13,10 SAY "For what month "
@ 13,40 GET month PICTURE '!XXXXXXXX'
READ
@ 16,10 SAY 'Hit any key when the printer is on and the proper paper loaded'
@ 17,10 SAY 'with the top of the form at the level of the print head.'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
SET PRINT ON
CLEA
STOR .t. TO bigloop
DO WHIL BIGLOOP .AND.(.NOT. EOF())
IF build <> '99'
STOR .f. TO bigloop
ELSE
STOR RECNO() TO rec_no
ENDI build <> '99'
STOR bcode TO mbcode
STOR baddr TO mbaddr
STOR SUBSTR(bcity,1,22) + ' ' + SUBSTR(bcity,23,5) TO mbcity
STOR remit TO mremit
STOR remitad TO mremitad
STOR remitc TO mremitc
STOR phone TO mphone
STOR checks TO mchecks
SELE B
USE &dr.:tenant
SET index TO &dr.:codea
SEEK mbcode
DO WHIL SUBSTR(bcode,1,2) = mbcode .AND.(.NOT. EOF())
IF tenant <> ' '
STOR 0 TO line
STOR 0 TO mtotal
STOR trent TO trentx
IF ttype = 'P'
IF (trentpc*(trentpcr/100)/12)>trent
STOR (trentpc*(trentpcr/100)/12) TO trentx
ENDI (trentpc)
ENDI ttype = 'P'
IF ttype = 'O'
STOR ((trentpc*(trentpcr/100)/12)+trent) TO trentx
ENDI ttype = 'O'
? ' '
? ' ' + mremit
? ' ' + mremitad
? ' ' + mremitc
? ' '
? ' '
? ' PLEASE SEND CHECKS TO ABOVE ADDRESS PAYABLE TO:'
? ' ' + mchecks
? ' '
? ' '
? ' '
? ' '
? ' ' + tenant + ' Unit ' +tunit
IF alt = 'Y'
? ' ' + altad
? ' ' + altcty
ELSE
? ' ' + mbaddr
? ' ' + mbcity
ENDI alt
? ' '
? ' '
? ' R E N T S T A T E M E N T'
? ' '
? ' '
? ' Refer inquiries to ' + mphone
? ' '
? ' '
IF trentp > 0
? ' Paid ' + trentpd + '. THANK YOU '+STR(trentp,12,2)
STOR line + 1 TO line
ENDI trentp > 0
? ' Unpaid balance ' + DTOC(date()) + ' '+STR(trentd,12,2)
STOR mtotal + trentd TO mtotal
? ' '
IF ttype = 'P' .OR. ttype = 'O'
? ' Base Rent ' + STR(trent,12,2)
ENDI ttype
? ' Base Rent for the month of ' + month + ' '+STR(trentx,12,2)
STOR mtotal + trentx TO mtotal
IF trente > 0
? ' Electricity '+ STR(trente,12,2)
STOR mtotal + trente TO mtotal
STOR line + 1 TO line
ENDI trente
IF trentm > 0
? ' Miscellaneous charges '+STR(trentm,12,2)
STOR mtotal + trentm TO mtotal
STOR line + 1 TO line
ENDI trentm > 0
IF taddl > 0
? ' Additional charges '+STR(taddl,12,2)
STOR mtotal + taddl TO mtotal
STOR line + 1 TO line
ENDI taddl >0
? ' '
? ' TOTAL DUE $'+STR(mtotal,12,2)
STOR mtotal + tlatec TO mtotal
? ' '
? ' '
? ' AFTER ' + TRIM(UPPER(month)) + ' ' +tlate + ' PAY - $ '+STR(mtotal,12,2)
STOR 11- line TO line1
DO WHIL line1 > 0
? ' '
STOR line1 - 1 TO line1
ENDD
ENDI tenant <> ' '
SKIP
ENDD WHILE $(bcode)
SELE A
USE &dr.:BUILD
SET INDEX TO &dr.:code
IF bigloop
GO rec_no
SKIP
ENDI bigloop
ENDD WHILE .NOT. EOF
ENDI comman = 'Y'
IF printer = 'Y'
EJEC
SET PRINT OFF
ENDI
SET CONFIRM off
CLEA
STOR .t. TO more
STOR 'Y' TO printer
STOR 'N' TO disk
STOR ' ' TO filename
STOR '?' TO select
SELE A
USE &dr.:build
SET INDEX TO &dr.:code
LOOP
CASE command = 'B'
* tenant roster
SELE B
USE &dr.:tenant
SET INDEX TO &dr.:codea
CLEA
* initialize variables
STOR 0 TO pageno
STOR 0 TO counter
STOR 0 TO counter1
STOR 0 TO additup
STOR ' ' TO mtenant
SET MARGIN TO 3
GO TOP
STOR .t. TO more1
DO WHIL more1
* do page counter etc
STOR pageno + 1 TO pageno
STOR 4 TO lineno
CLEA
? ' '
IF pageno = 1
? coname
? ' TENANT REPORT'
? ' '
? 'Report of ' +DTOC(date()) + '.'
STOR lineno + 4 TO lineno
ENDI pageno = 1
? ' ' + 'PAGE ' + STR(pageno,2)
? ' Tenant ' + 'Code '+ ' Unit '